{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "6c17c034",
   "metadata": {},
   "source": [
    "数据类型(Data types)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "59b16d0a",
   "metadata": {},
   "source": [
    "#### number"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b3e71f5c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1 + 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "b99d1bfe",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'int'>\n"
     ]
    }
   ],
   "source": [
    "number1 = 100\n",
    "number2 = 200\n",
    "number3 = number1 + number2\n",
    "print(type(number3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "a30f7bbb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "<class 'int'>\n"
     ]
    }
   ],
   "source": [
    "number1 = -1\n",
    "number2 = number1 * 0\n",
    "print(number2)\n",
    "print(type(number2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "e8c92067",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "python3 int range -9223372036854775807 - 9223372036854775807\n"
     ]
    }
   ],
   "source": [
    "import sys\n",
    "-sys.maxsize\n",
    "start = -sys.maxsize\n",
    "end = sys.maxsize\n",
    "print(f\"python3 int range {start} - {end}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ff4eb4d8",
   "metadata": {},
   "source": [
    "#### string"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "b73ffc91",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "text formated ==> : Messi and Edison\n",
      "text formated2 ==> : Messi and Edison\n"
     ]
    }
   ],
   "source": [
    "text0 = 'Messi'\n",
    "text1 = \"Edison\"\n",
    "text2 = \"\"\" Messi and Edison\"\"\"\n",
    "text_format = \"{name1} and {name2}\"\n",
    "\n",
    "me_and_ed = text_format.format(name1=text0,name2=text1)\n",
    "print(f\"text formated ==> : {me_and_ed}\")\n",
    "\n",
    "me_and_ed = \"%s and %s\" % (text0, text1)\n",
    "print(f\"text formated2 ==> : {me_and_ed}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3ac0c346",
   "metadata": {},
   "source": [
    "#### bool"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "d4db9868",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Result: ==> False\n",
      "Result: ==> True\n"
     ]
    }
   ],
   "source": [
    "print('Result: ==>', 1 == 2)\n",
    "print('Result: ==>', 2 == 2)\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
